package com.pj;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

/**
 * 启动：Sa-OAuth2 Server端
 * @author click33
 */
@SpringBootApplication
@EnableDiscoveryClient
public class GatewayServiceApplication {
	public static void main(String[] args) {
		SpringApplication.run(GatewayServiceApplication.class, args);
		System.out.println("当前 这个是SpringCloud项目,只对内部提供http服务，外部服务全部过网关");
		System.out.println("Spring Cloud Gateway 服务已启动");
		System.out.println("通过ZooInspector查看zk服务");
		System.out.println("场景1、通过gateway路由到product-service");
		System.out.println("浏览器访问地址：http://127.0.0.1:8092/api1/product/api/findbyId?bizId=123456789");
		System.out.println("浏览器访问地址：http://127.0.0.1:8092/api1/product/api/productManage/list?name=%E5%B0%8F%E5%B8%83");
		System.out.println("说明：product-service服务新增方法，gateway是无需重新发版的");

		System.out.println("场景二、通过gateway路由到feigen-api系统，通过feign调用到product-service系统");
		System.out.println("浏览器访问地址：http://127.0.0.1:8092/api1/feign/sendMsgV4?msg=nihao");
	}
}
